package com.huawei.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author 元气小喵仙~
 * @since 2025-06-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("users")
@ApiModel(value="Users对象", description="用户表")
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id 自动增长")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户名 非空且唯一")
    private String username;

    @ApiModelProperty(value = "密码 非空")
    private String password;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "用户类型(0表示管理员 1表示普通用户)")
    private String userType;

    @ApiModelProperty(value = "头像")
    private String icon;

    @ApiModelProperty(value = "邮箱 唯一")
    private String email;

    @ApiModelProperty(value = "手机号")
    private String phonenumber;

    @ApiModelProperty(value = "账号状态 (0正常 1停用)")
    private String status;

    @ApiModelProperty(value = "删除状态 (0表示未删除 1表示已删除)")
    private Integer delFlag;

    @ApiModelProperty(value = "用户创建时间")
    @TableField("createTime")
    private Timestamp createtime;

    @ApiModelProperty(value = "用户更新时间 默认是当前时间  当任意字段更新时会自动更新时间戳 无需手动维护")
    @TableField("updateTime")
    private Timestamp updatetime;


}
